\(\int \csc ^2(a+b x) \sec ^2(a+b x) \, dx\) [141]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 22 \[ \int \csc ^2(a+b x) \sec ^2(a+b x) \, dx=-\frac {\cot (a+b x)}{b}+\frac {\tan (a+b x)}{b} \]

[Out]

-cot(b*x+a)/b+tan(b*x+a)/b

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2700, 14} \[ \int \csc ^2(a+b x) \sec ^2(a+b x) \, dx=\frac {\tan (a+b x)}{b}-\frac {\cot (a+b x)}{b} \]

[In]

Int[Csc[a + b*x]^2*Sec[a + b*x]^2,x]

[Out]

-(Cot[a + b*x]/b) + Tan[a + b*x]/b

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2700

Int[csc[(e_.) + (f_.)*(x_)]^(m_.)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(1 + x^2)^((
m + n)/2 - 1)/x^m, x], x, Tan[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n)/2]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1+x^2}{x^2} \, dx,x,\tan (a+b x)\right )}{b} \\ & = \frac {\text {Subst}\left (\int \left (1+\frac {1}{x^2}\right ) \, dx,x,\tan (a+b x)\right )}{b} \\ & = -\frac {\cot (a+b x)}{b}+\frac {\tan (a+b x)}{b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.04 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.59 \[ \int \csc ^2(a+b x) \sec ^2(a+b x) \, dx=-\frac {2 \cot (2 (a+b x))}{b} \]

[In]

Integrate[Csc[a + b*x]^2*Sec[a + b*x]^2,x]

[Out]

(-2*Cot[2*(a + b*x)])/b

Maple [A] (verified)

Time = 0.26 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.41

method result size
derivativedivides \(\frac {\frac {1}{\sin \left (b x +a \right ) \cos \left (b x +a \right )}-2 \cot \left (b x +a \right )}{b}\) \(31\)
default \(\frac {\frac {1}{\sin \left (b x +a \right ) \cos \left (b x +a \right )}-2 \cot \left (b x +a \right )}{b}\) \(31\)
risch \(-\frac {4 i}{b \left ({\mathrm e}^{2 i \left (b x +a \right )}+1\right ) \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )}\) \(33\)
parallelrisch \(\frac {\tan ^{3}\left (\frac {b x}{2}+\frac {a}{2}\right )-6 \tan \left (\frac {b x}{2}+\frac {a}{2}\right )+\cot \left (\frac {b x}{2}+\frac {a}{2}\right )}{2 b \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )-2 b}\) \(54\)
norman \(\frac {\frac {1}{2 b}-\frac {3 \left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )\right )}{b}+\frac {\tan ^{4}\left (\frac {b x}{2}+\frac {a}{2}\right )}{2 b}}{\left (\tan ^{2}\left (\frac {b x}{2}+\frac {a}{2}\right )-1\right ) \tan \left (\frac {b x}{2}+\frac {a}{2}\right )}\) \(66\)

[In]

int(sec(b*x+a)^2/sin(b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

1/b*(1/sin(b*x+a)/cos(b*x+a)-2*cot(b*x+a))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.50 \[ \int \csc ^2(a+b x) \sec ^2(a+b x) \, dx=-\frac {2 \, \cos \left (b x + a\right )^{2} - 1}{b \cos \left (b x + a\right ) \sin \left (b x + a\right )} \]

[In]

integrate(sec(b*x+a)^2/sin(b*x+a)^2,x, algorithm="fricas")

[Out]

-(2*cos(b*x + a)^2 - 1)/(b*cos(b*x + a)*sin(b*x + a))

Sympy [F]

\[ \int \csc ^2(a+b x) \sec ^2(a+b x) \, dx=\int \frac {\sec ^{2}{\left (a + b x \right )}}{\sin ^{2}{\left (a + b x \right )}}\, dx \]

[In]

integrate(sec(b*x+a)**2/sin(b*x+a)**2,x)

[Out]

Integral(sec(a + b*x)**2/sin(a + b*x)**2, x)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00 \[ \int \csc ^2(a+b x) \sec ^2(a+b x) \, dx=-\frac {\frac {1}{\tan \left (b x + a\right )} - \tan \left (b x + a\right )}{b} \]

[In]

integrate(sec(b*x+a)^2/sin(b*x+a)^2,x, algorithm="maxima")

[Out]

-(1/tan(b*x + a) - tan(b*x + a))/b

Giac [A] (verification not implemented)

none

Time = 0.39 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.73 \[ \int \csc ^2(a+b x) \sec ^2(a+b x) \, dx=-\frac {2}{b \tan \left (2 \, b x + 2 \, a\right )} \]

[In]

integrate(sec(b*x+a)^2/sin(b*x+a)^2,x, algorithm="giac")

[Out]

-2/(b*tan(2*b*x + 2*a))

Mupad [B] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.64 \[ \int \csc ^2(a+b x) \sec ^2(a+b x) \, dx=-\frac {2\,\mathrm {cot}\left (2\,a+2\,b\,x\right )}{b} \]

[In]

int(1/(cos(a + b*x)^2*sin(a + b*x)^2),x)

[Out]

-(2*cot(2*a + 2*b*x))/b